//
//  MathTestCase.m
//  WiteBox
//
//  Created by John Blanco on 6/28/09.
//  Copyright 2009 Effective UI. All rights reserved.
//

#import "TestCase.h"

@interface MathTestCase : TestCase {}
@end

@implementation MathTestCase

- (void)testIntegerLogic {
	// test what is true and false
	ASSERT_TRUE(1);
	ASSERT_FALSE(0);
	ASSERT_TRUE(-1);
}

- (void)testIntegerMath {
	// test very basic integer math
	ASSERT_INTEGERS_EQUAL(2, 1+1);
	ASSERT_INTEGERS_EQUAL(-16, -8 + -8);
}

- (void)testDecimalMath {
	// test very basic decimal-based math
	ASSERT_DECIMALS_EQUAL(16.6, 12.25 + .75 + 3.1 + .5);
	ASSERT_DECIMALS_NOT_EQUAL(10.0, 5.0 + 5.0 + 1.0);
	ASSERT_DECIMALS_EQUAL_WITH_DELTA(14.11, 7.56 + 7.05, 1.0);
	ASSERT_DECIMALS_NOT_EQUAL_WITH_DELTA(1.0, 10.0 - 8.0, 0.5);
}

@end
